<%@ Page Language="C#" Theme="Defaultsys" AutoEventWireup="true" CodeFile="MarkCallDone.aspx.cs"
    Inherits="MarkCallDone" Title="Rapport Plan System - Mark call done" MasterPageFile="~/MasterPage.master" %>

<%@ MasterType VirtualPath="~/MasterPage.master" %>
<asp:Content runat="server" ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1">
   <!-- <link rel="stylesheet" type="text/css" media="all" href="jscripts/date/calendar-tas.css" title="win2k-cold-1" />-->
   

    <script type="text/javascript" src="jscripts/date/calendar.js"></script>

    <script type="text/javascript" src="jscripts/date/calendar-setup.js"></script>

    <table border="0" width="100%" cellpadding="0" cellspacing="0">
        <tr>
            <td class="contTable">
                <table width="100%">
                    <tr>
                        <td style="width: 22%">
                            Contact</td>
                        <td>
                            <asp:Label ID="lblContactName" runat="server" Text="Label"></asp:Label></td>
                    </tr>
                    <tr>
                        <td style="width: 22%">
                            Phone:</td>
                        <td>
                            <asp:Label ID="lblPhone" runat="server" Text="Label"></asp:Label></td>
                    </tr>
                    <tr>
                        <td style="width: 22%">
                            Mobile phone:</td>
                        <td>
                            <asp:Label ID="lblMobilePhone" runat="server" Text="Label"></asp:Label></td>
                    </tr>
                </table>
                <asp:GridView ID="grdFields" GridLines="None" SkinID="gvGridNone" runat="server" AllowPaging="false" AutoGenerateColumns="False"
                    DataKeyNames="CallPageFinishedFieldId" ShowHeader="false" Width="100%">
                    <Columns>
                        <asp:BoundField HeaderText="Property" DataField="Name" SortExpression="Name" ItemStyle-Width="22%" 
                        ItemStyle-VerticalAlign="top" />
                        <asp:BoundField HeaderText="Type" DataField="Type" SortExpression="Type" />
                        <asp:TemplateField HeaderText="Id" Visible="false">
                            <ItemTemplate>
                                <asp:TextBox ID="id" runat="server" Visible="false" Text='<%# Eval("CallPageFinishedFieldId") %>'></asp:TextBox>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
                <asp:Button ID="btnSave" runat="server" Text="Close call task" OnClick="MarkCallAsDone" /><asp:Button ID="btnCancel" runat="server" Text="Cancel" OnClick="Cancel" /><br />

                <script type="text/javascript">
  for (i=0; i<=9; i++){
    if (document.getElementById("ctl00_ContentPlaceHolder1_grdFields_ctl0"+i+"_txtDateTimeId")!= null){
    Calendar.setup({
        inputField     :    "ctl00_ContentPlaceHolder1_grdFields_ctl0"+i+"_txtDateTimeId",     // id of the input field
        ifFormat       :    "%m/%d/%Y",    // format of the input field
        button         :    "ctl00_ContentPlaceHolder1_grdFields_ctl0"+i+"_dateId",  // trigger for the calendar (button ID)
        singleClick    :    true
    });
    }
  }
                </script>

                <asp:Label ID="lblCallFinished" runat="server" ForeColor="#FF8000" Text="The call task was closed successfully"
                    Visible="False"></asp:Label></td>
        </tr>
    </table>
</asp:Content>
